package model

import (
	"time"
	"github.com/henrylee2cn/faygo/ext/db/xorm"
	goxorm "github.com/go-xorm/xorm"
)

type BaseModel struct {}

func ( this *BaseModel )Query() *goxorm.Engine{
	return  xorm.MustDB()
}

type Admin struct {
	BaseModel     `xorm:"-"`
	Id            int       `xorm:"not null pk autoincr INT(10)"`
	Name          string    `xorm:"not null VARCHAR(255)"`
	Telephone     string    `xorm:"not null unique VARCHAR(30)"`
	Email         string    `xorm:"not null unique VARCHAR(255)"`
	Password      string    `xorm:"not null VARCHAR(255)"`
	RememberToken string    `xorm:"VARCHAR(100)"`
	CreatedAt     time.Time `xorm:"TIMESTAMP"`
	UpdatedAt     time.Time `xorm:"TIMESTAMP"`
}
